# RUN: %lldb -b -s %s -c %p/Inputs/aarch64-freebsd-multithread.core | FileCheck %s

thread list
# CHECK: * thread #1: tid = 100160, 0x0000000000211fc4, name = 'a.out', stop reason = signal SIGSEGV
# CHECK-NEXT:   thread #2: tid = 100115, 0x00000000406267a8, name = 'a.out', stop reason = signal SIGSEGV
# CHECK-NEXT:   thread #3: tid = 100161, 0x0000000000211fc8, name = 'a.out', stop reason = signal SIGSEGV
# CHECK-NEXT:   thread #4: tid = 100162, 0x0000000000211fc8, name = 'a.out', stop reason = signal SIGSEGV


register read --all
# CHECK-DAG: w0 = 0x01010101
# CHECK-DAG: w1 = 0x02020202
# CHECK-DAG: w2 = 0x03030303
# CHECK-DAG: w3 = 0x04040404
# CHECK-DAG: v0 = {0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x40 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
# CHECK-DAG: v1 = {0x00 0x00 0x00 0x00 0x00 0x00 0x10 0x40 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
# CHECK-DAG: v2 = {0x00 0x00 0x00 0x00 0x00 0x00 0x20 0x40 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
# CHECK-DAG: v3 = {0x00 0x00 0x00 0x00 0x00 0x00 0x30 0x40 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}

thread select 3
# CHECK: (lldb) thread select 3
register read --all
# CHECK-DAG: w0 = 0x11111111
# CHECK-DAG: w1 = 0x12121212
# CHECK-DAG: w2 = 0x13131313
# CHECK-DAG: w3 = 0x14141414
# CHECK-DAG: v0 = {0x00 0x00 0x00 0x00 0x00 0x00 0x08 0x40 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
# CHECK-DAG: v1 = {0x00 0x00 0x00 0x00 0x00 0x00 0x18 0x40 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
# CHECK-DAG: v2 = {0x00 0x00 0x00 0x00 0x00 0x00 0x22 0x40 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
# CHECK-DAG: v3 = {0x00 0x00 0x00 0x00 0x00 0x00 0x28 0x40 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}

thread select 4
# CHECK: (lldb) thread select 4
register read --all
# CHECK-DAG: w0 = 0x21212121
# CHECK-DAG: w1 = 0x22222222
# CHECK-DAG: w2 = 0x23232323
# CHECK-DAG: w3 = 0x24242424
# CHECK-DAG: v0 = {0x00 0x00 0x00 0x00 0x00 0x00 0x14 0x40 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
# CHECK-DAG: v1 = {0x00 0x00 0x00 0x00 0x00 0x00 0x24 0x40 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
# CHECK-DAG: v2 = {0x00 0x00 0x00 0x00 0x00 0x00 0x2e 0x40 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
# CHECK-DAG: v3 = {0x00 0x00 0x00 0x00 0x00 0x00 0x34 0x40 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}
